<div xmlns:ext="http://www.extjs.com" class="body-wrap"><h1>Class <a href="source/ComponentMgr.html#cls-Ext.ComponentMgr">Ext.ComponentMgr</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">ComponentMgr.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/ComponentMgr.html#cls-Ext.ComponentMgr">ComponentMgr</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description"><p>Provides a registry of all Components (specifically subclasses of
<a href="output/Ext.Component.html" ext:cls="Ext.Component">Ext.Component</a>) on a page so that they can be easily accessed by
component id (see <a href="output/Ext.getCmp.html" ext:cls="Ext.getCmp">Ext.getCmp</a>).</p>
<p>This object also provides a registry of available Component <i>classes</i>
indexed by a mnemonic code known as the Component's <a href="output/Ext.Component.html#Ext.Component-xtype" ext:member="xtype" ext:cls="Ext.Component">Ext.Component.xtype</a>.
The <tt>xtype</tt> provides a way to avoid instantiating child Components
when creating a full, nested config object for a complete Ext page.</p>
<p>
A child Component may be specified simply as a <i>config object</i>
as long as the correct xtype is specified so that if and when the Component
needs rendering, the correct type can be looked up for lazy instantiation.</p>
<p>For a list of all available xtypes, see <a href="output/Ext.Component.html" ext:cls="Ext.Component">Ext.Component</a>.</p><br><br><i>This class is a singleton and cannot be created directly.</i></div><div class="hr"></div><a id="Ext.ComponentMgr-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ComponentMgr-all"></a><b><a href="source/ComponentMgr.html#prop-Ext.ComponentMgr-all">all</a></b> : MixedCollection<div class="mdesc"><div class="short">The MixedCollection used internally for the component cache. An example usage may be subscribing to&#13;
events on the Mi...</div><div class="long">The MixedCollection used internally for the component cache. An example usage may be subscribing to
events on the MixedCollection to monitor addition or removal.  Read-only.</div></div></td><td class="msource">ComponentMgr</td></tr></tbody></table><a id="Ext.ComponentMgr-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ComponentMgr-get"></a><b><a href="source/ComponentMgr.html#method-Ext.ComponentMgr-get">get</a></b>(&nbsp;<code>String&nbsp;id</code>&nbsp;)
    :
                                        Ext.Component<div class="mdesc"><div class="short">Returns a component by id</div><div class="long">Returns a component by id<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>id</code> : String<div class="sub-desc">The component id</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.Component</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">ComponentMgr</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ComponentMgr-onAvailable"></a><b><a href="source/ComponentMgr.html#method-Ext.ComponentMgr-onAvailable">onAvailable</a></b>(&nbsp;<code>String&nbsp;id</code>,&nbsp;<code>Function&nbsp;fn</code>,&nbsp;<code>Object&nbsp;scope</code>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Registers a function that will be called when a specified component is added to ComponentMgr</div><div class="long">Registers a function that will be called when a specified component is added to ComponentMgr<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>id</code> : String<div class="sub-desc">The component id</div></li><li><code>fn</code> : Function<div class="sub-desc">The callback function</div></li><li><code>scope</code> : Object<div class="sub-desc">The scope of the callback</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">ComponentMgr</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ComponentMgr-register"></a><b><a href="source/ComponentMgr.html#method-Ext.ComponentMgr-register">register</a></b>(&nbsp;<code>Ext.Component&nbsp;c</code>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Registers a component.</div><div class="long">Registers a component.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>c</code> : Ext.Component<div class="sub-desc">The component</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">ComponentMgr</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ComponentMgr-registerType"></a><b><a href="source/ComponentMgr.html#method-Ext.ComponentMgr-registerType">registerType</a></b>(&nbsp;<code>String&nbsp;xtype</code>,&nbsp;<code>Constructor&nbsp;cls</code>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Registers a new Component constructor, keyed by a new&#13;
Ext.Component.xtype.&#13;
Use this method to register new subclass...</div><div class="long">Registers a new Component constructor, keyed by a new
<a href="output/Ext.Component.html#Ext.Component-xtype" ext:member="xtype" ext:cls="Ext.Component">Ext.Component.xtype</a>.<br><br>
Use this method to register new subclasses of <a href="output/Ext.Component.html" ext:cls="Ext.Component">Ext.Component</a> so
that lazy instantiation may be used when specifying child Components.
see <a href="output/Ext.Container.html#Ext.Container-items" ext:member="items" ext:cls="Ext.Container">Ext.Container.items</a><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>xtype</code> : String<div class="sub-desc">The mnemonic string by which the Component class
may be looked up.</div></li><li><code>cls</code> : Constructor<div class="sub-desc">The new Component class.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">ComponentMgr</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ComponentMgr-unregister"></a><b><a href="source/ComponentMgr.html#method-Ext.ComponentMgr-unregister">unregister</a></b>(&nbsp;<code>Ext.Component&nbsp;c</code>&nbsp;)
    :
                                        void<div class="mdesc"><div class="short">Unregisters a component.</div><div class="long">Unregisters a component.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>c</code> : Ext.Component<div class="sub-desc">The component</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">ComponentMgr</td></tr></tbody></table><a id="Ext.ComponentMgr-events"></a><h2>Public Events</h2><div class="no-members">This class has no public events.</div></div>